private void Row_DoubleClick(object sender, MouseButtonEventArgs e)
{
ClassName classObj = dataGridName.SelectedItem as ClassName;
string id = classObj.ID;
}
private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try
{
var row_list = (Item)dg.SelectedItem;
listblock1.Content = "You Selected: " + row_list.FirstName + " " + row_list.LastName;
}
catch { }
}
public class Item
{
public string FirstName { get; set; }
public string LastName { get; set; }
}